<template>
  <ve-wordcloud
    :data="chartData"
    height="100%"
    :shape="chartShape"
  ></ve-wordcloud>
</template>

<script>
export default {
  data() {
    return {
      chartShape: "diamond",
      chartData: {
        columns: ["name", "value"],

        rows: [
          { name: "西欧后", value: 100 * Math.random() },
          { name: "西欧后2", value: 100 * Math.random() },
          { name: "HIA", value: 100 * Math.random() },
          { name: "HIA是的是的", value: 100 * Math.random() },
          { name: "sdsd", value: 100 * Math.random() },
          { name: "东风风光", value: 100 * Math.random() },
          { name: "非官方个", value: 100 * Math.random() },
          { name: "那个号", value: 100 * Math.random() },
          { name: "二二", value: 100 * Math.random() },
          { name: "f地方", value: 100 * Math.random() },
          { name: "好好干", value: 100 * Math.random() },
          { name: "ddf", value: 100 * Math.random() },
          { name: "的大V", value: 100 * Math.random() },
          { name: "怪怪的", value: 100 * Math.random() },
        ],
      },
      chartSettings: {},
    };
  },
  mounted() {
    this.chartSettings = {
      shape: "diamond", // shape 可选值有cardioid、 diamond、triangle-forward、triangle、pentagon、star等
      color: [
        "rgb(" +
          [
            Math.round(Math.random() * 256),
            Math.round(Math.random() * 256),
            Math.round(Math.random() * 256),
          ].join(",") +
          ")",
        "rgb(" +
          [
            Math.round(Math.random() * 256),
            Math.round(Math.random() * 256),
            Math.round(Math.random() * 256),
          ].join(",") +
          ")",
        "rgb(" +
          [
            Math.round(Math.random() * 256),
            Math.round(Math.random() * 256),
            Math.round(Math.random() * 256),
          ].join(",") +
          ")",
        "rgb(" +
          [
            Math.round(Math.random() * 256),
            Math.round(Math.random() * 256),
            Math.round(Math.random() * 256),
          ].join(",") +
          ")",
      ],
      label: {
        show: false,
      },
    };
  },
  methods: {},
};
</script>

<style>
</style>